package com.lekang.service.impl;

import java.util.List;
import com.lekang.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lekang.mapper.CheckOutManagementMapper;
import com.lekang.domain.CheckOutManagement;
import com.lekang.service.ICheckOutManagementService;

/**
 * 退住管理Service业务层处理
 * 
 * @author chengbingzhen
 * @date 2025-10-15
 */
@Service
public class CheckOutManagementServiceImpl implements ICheckOutManagementService 
{
    @Autowired
    private CheckOutManagementMapper checkOutManagementMapper;

    /**
     * 查询退住管理
     * 
     * @param id 退住管理主键
     * @return 退住管理
     */
    @Override
    public CheckOutManagement selectCheckOutManagementById(Long id)
    {
        return checkOutManagementMapper.selectCheckOutManagementById(id);
    }

    /**
     * 查询退住管理列表
     * 
     * @param checkOutManagement 退住管理
     * @return 退住管理
     */
    @Override
    public List<CheckOutManagement> selectCheckOutManagementList(CheckOutManagement checkOutManagement)
    {
        return checkOutManagementMapper.selectCheckOutManagementList(checkOutManagement);
    }

    /**
     * 新增退住管理
     * 
     * @param checkOutManagement 退住管理
     * @return 结果
     */
    @Override
    public int insertCheckOutManagement(CheckOutManagement checkOutManagement)
    {
        checkOutManagement.setCreateTime(DateUtils.getNowDate());
        return checkOutManagementMapper.insertCheckOutManagement(checkOutManagement);
    }

    /**
     * 修改退住管理
     * 
     * @param checkOutManagement 退住管理
     * @return 结果
     */
    @Override
    public int updateCheckOutManagement(CheckOutManagement checkOutManagement)
    {
        checkOutManagement.setUpdateTime(DateUtils.getNowDate());
        return checkOutManagementMapper.updateCheckOutManagement(checkOutManagement);
    }

    /**
     * 批量删除退住管理
     * 
     * @param ids 需要删除的退住管理主键
     * @return 结果
     */
    @Override
    public int deleteCheckOutManagementByIds(Long[] ids)
    {
        return checkOutManagementMapper.deleteCheckOutManagementByIds(ids);
    }

    /**
     * 删除退住管理信息
     * 
     * @param id 退住管理主键
     * @return 结果
     */
    @Override
    public int deleteCheckOutManagementById(Long id)
    {
        return checkOutManagementMapper.deleteCheckOutManagementById(id);
    }
}
